-
Notifications
You must be signed in to change notification settings - Fork 14.1k
c-variadic: bpf and spirv do not support c-variadic definitions #149557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
2af7dca to
1f9013b
Compare
1f9013b to
80a780f
Compare
|
These commits modify compiler targets. |
80a780f to
695d2fa
Compare
| // We don't know if the target supports c-variadic definitions, but we don't want | ||
| // to needlesly restrict custom target.json configurations. | ||
| Other(_) => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of up for debate, but a custom target.json is kind of "here be dragons" already, and if the new target gets proper compiler support a choice still has to be made here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems fine to me.
| variadic_span: variadic_param.span, | ||
| target: &*self.sess.target.llvm_target, | ||
| }); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emitting other errors here doesn't seem useful when the target just does not support c-variadics.
This comment has been minimized.
This comment has been minimized.
695d2fa to
fe1855e
Compare
This comment has been minimized.
This comment has been minimized.
fe1855e to
fc017dd
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
tracking issue: #44930
Emit a nice error message on bpf and spirv targets when a c-variadic function is defined. Spirv also does not support c-variadic calls, bpf appears to allow them.
r? @workingjubilee